package com.dys.controller;

import com.dys.pojo.Emp;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @className: com.dys.controller.AnnoController
 * @description: com.dys.controller
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/11/01 22:11
 */
@Controller
@CrossOrigin(origins = "https://www.baidu.com", maxAge = 3600)
public class AnnoController {

    @ResponseBody
    @RequestMapping("demo1.action")
    public Emp demo1(@RequestBody(required = false) Emp emp) {
        System.out.println(emp);
        return emp;
    }
}
